home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / xecho11.zip / XECHO.DOC < prev   
Text File  |  1988-04-19  |  3KB  |  58 lines

  1. XECHO.ASM  version 1.1  -  by John Wright,  19-March-1988
  2.  
  3. Utility for generating character strings which include control and special
  4. characters.  Strings are specified on the command line using "Lotus 1-2-3"
  5. like syntax with "\nnn" being translated as the ASCII code for decimal 'nnn'.
  6. Strings are sent to the standard output and may be redirected to a file or a
  7. device.  Note that unlike the ECHO command in DOS, XECHO does not append a
  8. CR,LF pair to the output string.
  9.  
  10. Usage:
  11.         XECHO [xxxxx....] [> file or device spec]
  12.  
  13.     where "x" can be either:
  14.     - any character which can be entered on a DOS command line (ie. blanks
  15.        and any keyboard characters or ALT-key sequences not filtered by DOS 
  16.       such as CR (Enter), LF, BS, DEL, ^C, ^P, ">", "<", "|", etc.);  all
  17.       characters are sent to standard output as is.
  18.     - a sequence of characters beginning with "\":
  19.       - "\" followed by 1 to 3 digits is translated as the ASCII code 
  20.         represented by interpreting the digits as a decimal value modulo
  21.         256; the sequence is terminated by a non-digit, the end of the
  22.         command line or a fourth digit.
  23.        - "\" followed by a non-digit character is translated as that char.
  24.  
  25. Notes:
  26.     - TAB characters in the command line string are not expanded.
  27.     - leading blanks and TABs (between "xecho" and the first visible char.
  28.       following on the command line are skipped; to send strings beginning
  29.       with a blanks or tabs use \20 or \9 for at least for the first one.
  30.     - trailing blanks and TABs (between the last visible character of the
  31.       command and the CR, ">", "<", or "|") are preserved and sent as is.
  32.     - "\1", "\01" and "\001" are equivalent (assuming for the first two
  33.       cases that the following character is not a digit) to ^A; 
  34.     - "\0001" would be translated as ASCII NUL followed by "1".
  35.     - to send the back-slash character, "\", use "\\" in the command line.
  36.     - "\" at the end of the command line is ignored.
  37.     - the command "xecho >null" creates an empty file "null".
  38.  
  39. XECHO is particularly useful for sending control strings to on-line devices
  40. such as printers or modems.  For instance "xecho \15>prn" selects condensed
  41. printing on an Epson compatible printer, "xecho \027@>prn" sends a printer
  42. reset, and "xecho \12>prn" sends a form-feed.
  43.  
  44. Revisions:
  45.     1.0 -  2-March-88, J.W. - original
  46.     1.1 - 19-March-88, J.W. - limited no. digits after '\' to 3 for
  47.         compatibility with Lotus-style strings + improved code
  48.  
  49. And lest we forget,
  50.     "Lotus" *and* "1-2-3" are trademarks of Lotus Development Corp.
  51.     "Epson" is a trademark of Seiko Epson Corp.
  52.  
  53. XECHO is declared in the public domain by its author.
  54.  
  55. John Wright
  56. Halifax, Nova Scotia, Canada
  57. 18-April-88
  58.